/**
 * TotalFooter - Prints the subtotal + tax line for a bill.
 * 
 * CS575 Software Design
 * Group 6
 * Group Members: Anthony Davidson, Kendra Scheesley, Lyndsey Whitman, Stephen Zakrewsky
 * Date: May 31, 2012
 * Main Author(s): Lyndsey Whitman
 */
package edu.drexel.cs575.a3;

import java.text.NumberFormat;

import edu.drexel.cs575.a3.location.LocaleEnum;
import edu.drexel.cs575.a3.location.Location;
import edu.drexel.cs575.a3.location.LocationProvider;

public class TotalFooter extends BillDecorator
{
private double total;
	
	public TotalFooter(Bill myBill, double total)
	{
		super(myBill);
		
		this.total = total;
	}
	
	public void printBill()
	{
		super.printBill();
		
		Location location = LocationProvider.getInstance().getLocation();
		LocaleEnum locale = location.getLocaleEnum();

		NumberFormat currencyFormat = NumberFormat.getCurrencyInstance(locale.getLocale());
		
		display("Total: " + currencyFormat.format(total));
	}
}
